<!DOCTYPE html>
<html class="x-admin-sm"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font.css" th:href="@{/css/font.css}">
    <link rel="stylesheet" href="./css/xadmin.css" th:href="@{/css/xadmin.css}">
    <script src="./lib/layui/layui.js" th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js" th:src="@{/js/xadmin.js}"></script>
</head>

<body>
<!-- 顶部开始 -->
<div th:fragment="top">
<div class="container">
    <div class="logo">
        <a href="./index.html" th:href="@{/toIndex}">红酒管理系统</a></div>
    <div class="left_open">
        <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
    </div>
    <ul class="layui-nav right" lay-filter="">
        <img src="images/admin1.jpg" th:src="@{/images/admin1.jpg}" style="height: 30px;width: 30px;">
        <li class="layui-nav-item">
            <a href="javascript:;">[[${session.loginUser.getUsername()}]]</a>
            <dl class="layui-nav-child">
                <!-- 二级菜单 -->
                <dd>
                    <a th:href="@{/logout}" >退出</a></dd>
            </dl>
        </li>
    </ul>
</div>
</div>
<!-- 顶部结束 -->
<!-- 左侧菜单开始 -->
<div th:fragment="side">
<div class="left-nav">
    <div class="layui-row">
    <div class="layui-col-md4 layui-box" style="text-align: center;">
        <img  class="layui-circle" th:src="@{/images/admin1.jpg}" style="width: 60px;height: 60px"/>
    </div>
    <div class="layui-col-md8 layui-text">
        <p>用户名:[[${session.loginUser.getUsername()}]]</p>
        <p>角色:[[${session.loginUser.getRole()=='superAdmin'?'超级管理员':'普通管理员'}]]</p>
        <p><span class="layui-badge-dot layui-bg-green"></span>  在线</p>
    </div>
    </div>
    <div id="side-nav">
        <ul id="nav">
            <li>
                <a href="javascript:">
                    <i class="iconfont left-nav-li" lay-tips="订单管理">&#xe723;</i>
                    <cite>商品管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a th:href="@{/wine/getWines}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>商品列表</cite></a>
                    </li>
                    <li>
                        <a th:href="@{/wine/toAdd}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>添加商品</cite></a>
                    </li>
                    <li>
                        <a th:href="@{/category/getCategories}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>商品种类列表</cite></a>
                    </li>
                    <li>
                        <a th:href="@{/category-edit-block}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>添加种类</cite></a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:">
                    <i class="iconfont left-nav-li" lay-tips="订单管理">&#xe723;</i>
                    <cite>订单管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a th:href="@{/order/getOrders}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>订单列表</cite></a>
                    </li>

                    <li>
                        <a th:href="@{/order/toOrder}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>添加订单</cite></a>
                    </li>
                </ul>
            </li>

            <li>
                <a href="javascript:;">
                    <i class="iconfont left-nav-li" lay-tips="会员管理">&#xe6b8;</i>
                    <cite>会员管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a th:href="@{/member/allMember}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>会员列表</cite></a>
                    </li>
                    <li>
                        <a th:href="@{/member/toAdd}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>添加会员</cite></a>
                    </li>
                </ul>
            </li>

            <li shiro:hasPermission="superAdmin">
                <a href="javascript:;">
                    <i class="iconfont left-nav-li" lay-tips="管理员管理">&#xe726;</i>
                    <cite>管理员管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i></a>
                <ul class="sub-menu">
                    <li>
                        <a th:href="@{/admin/allAdmin}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>管理员列表</cite></a>
                    </li>
                    <li>
                        <a th:href="@{/admin/toAdd}">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>添加管理员</cite></a>
                    </li>

                </ul>
            </li>
        </ul>
    </div>
</div>
</div>
</body>
</html>